import re
s = "aabcce abcde abce ace a2e"

# 找a和e中间隔了一个字符的字符串
res = re.findall(pattern="a.e", string=s)
print(res) 
# 找a和e中间隔了两个字符的字符串
res2 = re.findall(pattern="a..e",string=s)
print(res2)

s1 = "aabcce abcde a\ne ace a2e"
# 设置通配符能匹配\n
res3 = re.findall("a.e",s1,re.S)
print('res3',res3)